aux_source_directory(. SRCS_MAIN)
add_executable(${PROJECT_NAME} ${SRCS_MAIN})

target_link_libraries(${PROJECT_NAME} zlog ${lib_configuration_name})
set_target_properties(${PROJECT_NAME} PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${bin_dir})
set_target_properties(${PROJECT_NAME} PROPERTIES INSTALL_RPATH "\${ORIGIN}/../lib")

# 构建后 动作
add_custom_command(TARGET ${PROJECT_NAME} POST_BUILD

    # 复制运行脚本
    COMMAND ${CMAKE_COMMAND} -E copy ${PROJECT_SOURCE_DIR}/resources/c-hello ${sbin_dir}/c-hello

    # 创建日志目录
    COMMAND ${CMAKE_COMMAND} -E make_directory ${log_dir}
)
